<?php

use Faker\Generator as Faker;

$factory->define(App\Models\Product::class, function (Faker $faker) {
    /*
    $images=[
        "https://iocaffcdn.phphub.org/uploads/images/201806/01/5320/7kG1HekGK6.jpg",
        "https://iocaffcdn.phphub.org/uploads/images/201806/01/5320/1B3n0ATKrn.jpg",
        "https://iocaffcdn.phphub.org/uploads/images/201806/01/5320/r3BNRe4zXG.jpg",
        "https://iocaffcdn.phphub.org/uploads/images/201806/01/5320/C0bVuKB2nt.jpg",
        "https://iocaffcdn.phphub.org/uploads/images/201806/01/5320/82Wf2sg8gM.jpg",
        "https://iocaffcdn.phphub.org/uploads/images/201806/01/5320/nIvBAQO5Pj.jpg",
        "https://iocaffcdn.phphub.org/uploads/images/201806/01/5320/XrtIwzrxj7.jpg",
        "https://iocaffcdn.phphub.org/uploads/images/201806/01/5320/uYEHCJ1oRp.jpg",
        "https://iocaffcdn.phphub.org/uploads/images/201806/01/5320/2JMRaFwRpo.jpg",
        "https://iocaffcdn.phphub.org/uploads/images/201806/01/5320/pa7DrV43Mw.jpg",
    ];
    //*/
    $images=[
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/83cabe5e-25bf-449e-a676-1c83e3b5ed7b.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/0c0d05d7-3e31-4c43-8d83-4adf0dabb35b.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/88385635-4ead-41da-8342-77ce0f3e815e.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/edada515-6f9c-4344-a66a-82e030f7ba18.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/be51bb60-951e-404b-9ae2-c545f03b278c.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/5d360604-7a8d-449c-8095-4e3df7e1eab0.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/62c4825b-b333-435a-ab4e-b5318d00f2e4.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/ec519d64-4345-4e8e-b7dd-14dc00f13e4c.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/4f0f5b32-afc0-4909-93e0-61ed36c94bd2.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/7b1645b7-e87d-4144-a186-dbe9690f5721.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/1983fa2f-101c-427c-927b-8f0db9f69f29.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/9414b5f0-3a31-4c50-8f4c-379a8e61a4c2.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/26f38700-39a0-44f9-a11d-1e2aff333848.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/2627ec13-2131-4016-9729-c86a124f8056.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/a90389cf-9e24-459b-8590-ecbfdb9b651d.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/298f554a-201b-4f13-8823-bc517e439b38.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/57862647-1fce-4b30-bac6-794e6977bc1c.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/35951e7f-f467-4cd6-86c0-a4751d7c274d.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/b62cc03b-18b2-4b48-b5e3-19f2025f9976.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/ef561d63-76da-48ec-a198-0fc433c71174.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/6663b843-3ba8-4ccf-90a2-b12afeeca480.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/798b541b-85c8-4eef-9cd7-8d443600b06a.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/2b285403-91e0-4d8e-9112-b55970be327d.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/28a5ab4b-abe2-4aa8-a7c9-c88691a3b03d.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/48fc155f-9b46-4308-8955-378d6aead563.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/2ff3eb8f-9faf-4b73-99ca-3c0d0e54ec92.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/51232268-826d-4b27-84e9-d49cdae1efba.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/187a9116-aca3-4d3b-85bd-18edae7fba00.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/418715a1-0491-4d71-a943-42401883a119.jpg',
        'http://resource.pipikou.com/KEPicFolder/E4261292E37748D1B65D603D13D19973/attached/upload1/2019-03-08/80e530b2-04b9-441e-aa82-76ee70a36d47.jpg',
    ];
    return [
        'title'=>$faker->name,
        'description'=>$faker->sentence,
        'image'=>$faker->randomElement($images),
        'on_sale'=>true,
        'sold_count'=>$faker->randomNumber(2),
        'review_count'=>$faker->numberBetween(0,100),
        'rating'=>5,
        'price'=>0,
    ];
});
